<template>
    <view>
<!--播放器-->
        <view id="mse"></view>
<!--简介-->
<!--剧集-->

<!--评论-->
    </view>
</template>

<script>
    import 'xgplayer';
    import HlsJsPlayer from 'xgplayer-hls.js';

    export default {
        name: "home",
        components: {},
        data() {
            return {
                player: null
            }
        },
        methods: {},
        mounted() {
            this.player = new HlsJsPlayer({
                id: 'mse',
                url: 'https://youku.cdn2-okzy.com/20200504/9471_edd7015a/index.m3u8',
                //流式布局
                fluid: true,
                fitVideoSize: 'auto',
                //封面图
                poster: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg',
                // 倍速播放
                playbackRate: [0.5, 0.75, 1, 1.5, 2],
                //自动下一集
                playNext: {
                    urlList: [
                        'https://youku.cdn2-okzy.com/20200504/9471_edd7015a/index.m3u8',
                        'https://iqiyi.cdn9-okzy.com/20200505/9848_a16ecd48/index.m3u8',
                        'https://iqiyi.cdn9-okzy.com/20200505/9851_010bb5e6/index.m3u8'
                    ],
                },
                //微信全屏播放
                'x5-video-player-fullscreen': false,
                //移动端环境下打开hls解析功能
                useHls: true,
                // 默认预加载 15 秒
                preloadTime: 15
            });
        }
    }
</script>

<style scoped lang="scss">

</style>